<?php

function __autoload($classname) {
    
    # Look in these folders for classes we need
    $folders = array(
        '../test.shoestring/',
        '../test.shoestring/database/',
        $GLOBALS['libaryPath'],
        $GLOBALS['libaryPath'].'/engines/',
        $GLOBALS['libaryPath'].'/panels/',
        $GLOBALS['libaryPath'].'/components/'
    );
    
    foreach($folders as $folder) {
        
        if(file_exists($folder.$classname.'.class.php')) {
            include($folder.$classname.'.class.php');
        }
        
    }
    
}
?>
